package com.zzzy.common.exception;

import com.zzzy.common.enums.ResultCodeEnum;
import lombok.Getter;

@Getter
public class WarningException extends RuntimeException{

    private String code;
    private String message;

    public WarningException(String message) {
        this.code = ResultCodeEnum.WARNING.getCode();
        this.message = message;
    }
    public WarningException(String code, String message) {
        this.code = code;
        this.message = message;
    }
    public WarningException(ResultCodeEnum resultCodeEnum) {
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }
}
